<?php echo form_open('stores/update'); ?>

  <?php foreach($result as $row) { ?>
	<p>SID: <input type="text" name="id" id="id" value="<?php echo $row->id; ?>"></p>
	<p>Name: <input type="text" name="name" id="name" value="<?php echo $row->Name; ?>"></p>
	<p>City ID: <input type="text" name="city_id" id="city_id" value="<?php echo $row->city_id; ?>"></p>
	<p>User ID: <input type="text" name="user_id" id="user_id" value="<?php echo $row->user_id; ?>"></p>
	<p><?php echo form_submit('update','Update'); ?></p>
   <?php } ?>
	<?php echo form_close(); ?>
	<?php echo validation_errors(); ?>